package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class RowContextuallyTypedRowValueConstructorElementList implements ContextuallyTypedRowValueConstructor {

    private int beginIndex;
    private int endIndex;
    private boolean row;
    private List<ContextuallyTypedRowValueConstructorElement> contextuallyTypedRowValueConstructorElementList;

    public RowContextuallyTypedRowValueConstructorElementList(int beginIndex,
                                                              int endIndex,
                                                              boolean row,
                                                              List<ContextuallyTypedRowValueConstructorElement> contextuallyTypedRowValueConstructorElementList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.row = row;
        this.contextuallyTypedRowValueConstructorElementList = contextuallyTypedRowValueConstructorElementList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isRow() {
        return row;
    }

    public int size() {
        return contextuallyTypedRowValueConstructorElementList.size();
    }

    public ContextuallyTypedRowValueConstructorElement get(int index) {
        return contextuallyTypedRowValueConstructorElementList.get(index);
    }

}
